<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="UTF-8" import="java.text.SimpleDateFormat"
	import="java.util.Date" import="java.util.List"%>
<%@include file="/lib/common/basedir.jsp"%>
<!DOCTYPE html>
<html lang="en">
<head>
<%@include file="/lib/common/headerResource.html"%>

<!--sidebar-->
<link href="<%=basedir%>/lib/css/sidebar.css" rel="stylesheet">




<title>DessertHouse</title>

<style>
.modify {
	margin-right: 5px;;
}

.add {
	font-size: 1.5em;
}
</style>

</head>
<body>
	<div class="container-fluid">
		<div class="row">
			<!--左侧导航-->
			<div class="col-sm-3 col-md-2 sidebar">
				<%@include file="../sidebar.jsp"%>
			</div>

			<!--右面板-->
			<div
				class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 rightPanel">
				<div class="row">
					<h2 class="page-header col-md-11">销售计划</h2>
				</div>

				<h3>待审批</h3>
				<div class="table-responsive">
					<table class="table table-striped table-hover">
						<thead>
							<tr>
								<th>日期</th>
								<th>店铺编号</th>
							</tr>
						</thead>
						<tbody>
							<%
									@SuppressWarnings("unchecked")
									List<String> planIds=(List<String>)request.getAttribute("toBeApproved");
									if(planIds.size()>0){
										for(String s:planIds){
											String[] date_storeId=s.split("_");
										String date=new SimpleDateFormat("yyyy-MM-dd").format(new Date(Long.parseLong(date_storeId[0])));
										String storeId=date_storeId[1];
									
								%>
							<tr>
								<td><%=date %></td>
								<td><%=storeId %></td>
								<td><span class="glyphicon glyphicon-pencil modify"
									aria-hidden="true" role="button" data-toggle="tooltip"
									data-placement="bottom" title="审批"
									onclick="document.location='<%=basedir%>/manager/salesPlan?id=<%=s %>';"></span></td>
							</tr>

							<%
										}
									}
							%>
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>


	<!-- jquery and bootstrap js -->
	<%@include file="/lib/common/footerResource.html"%>

	<script>
		$(function() {
			$("[data-toggle='tooltip']").tooltip();
		});
	</script>
</body>
</html>